feat(preview): print link alongside qr code#592
Conversation
Previously the preview URL was only printed when QR rendering failed. Print it unconditionally above the QR so users can copy-paste the link without scanning. Co-Authored-By: RapidPoseidon <poseidon@rapidata.ai>
Code ReviewOverviewThis PR fixes a genuine UX bug: when QR rendering succeeded, the preview URL was never shown to the user — only a bare Code QualityPositive:
Before / After summary:
Suggestions
VerdictThe logic is correct, the diff is clean, and this is a clear improvement over the previous behaviour. The only actionable suggestion is the optional visual separator (point 1 above). Ready to merge as-is or with that minor tweak. |
Summary
When creating a job definition (or order), the SDK was printing a QR code linking to the campaign preview page but only printing the URL itself if QR rendering failed. This makes the link unreachable for anyone wanting to copy-paste it.
Now
print_campaign_preview_qrprintsPreview at: <url>unconditionally, with the QR code rendered below it as a convenience for opening on a phone.Test plan
silent_modestill suppresses bothqrcodeimport or render fails, the URL is still printed (and not duplicated)🔗 Session: ${POSEIDON_SESSION_URL:-$HOSTNAME}